package com.creating.mict.common;


import java.util.Random;

/**
 * @ClassName: RandomColor
 * @Description: TODO(这里用一句话描述这个类的作用)
 * @author xuelei
 * @date 2012-10-23 上午11:41:38
 * 
 */
public class RandomColor {

	public String getRandColor() {
		String r, g, b;
		Random random = new Random();
		r = Integer.toHexString(random.nextInt(256)).toUpperCase();
		g = Integer.toHexString(random.nextInt(256)).toUpperCase();
		b = Integer.toHexString(random.nextInt(256)).toUpperCase();

		r = r.length() == 1 ? "0" + r : r;
		g = g.length() == 1 ? "0" + g : g;
		b = b.length() == 1 ? "0" + b : b;
		// return "#" + r + g + b;
		return r + g + b;
	}

}
